//
//  UITextField-Addition.h
//  MClient
//
//  Created by  史正烨 on 10-9-6.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "UITextFieldAdditions.h"

@interface MALabel : UILabel
{
}

@end

@class MCControl;

@interface MCTextField : UITextField {
	NSInteger            _tagEx;
	NSString            *_fieldName;
	//公式计算回填
	NSMutableDictionary	*_formulaStyle;
}
@property(nonatomic,assign)NSInteger   tagEx;
@property(nonatomic,copy)NSString    *fieldName;
@property(nonatomic,retain)NSMutableDictionary	 *formulaStyle;
@end

@interface MCTextView : UITextView {
	NSInteger            _tagEx;
	NSString            *_fieldName;
	//公式计算回填
	NSMutableDictionary	*_formulaStyle;
}
@property(nonatomic,assign)NSInteger   tagEx;
@property(nonatomic,copy)NSString    *fieldName;
@property(nonatomic,retain)NSMutableDictionary	 *formulaStyle;
@end

typedef enum {
    MCControl_TextField,
    MCControl_Lable,
	MCControl_TextView
} MCControlStyle;

@interface MCControl : UIView
{
	MCControlStyle       _controlStyle;
	id                   _control;
	
	NSInteger            _tagEx;
	NSInteger            _lableStyle;
	//char                 _fieldType;
	NSString            *_fieldName;
}
	
@property(nonatomic,readonly,assign) MCControlStyle   style;
@property(nonatomic,assign) NSString   *text;
@property(nonatomic) NSInteger numberOfLines;
@property(nonatomic)        UITextAlignment textAlignment;
@property(nonatomic,assign) UIColor        *textColor;
@property(nonatomic,assign) UIColor        *backgroundColor;
@property(nonatomic,assign) UIFont         *font;
@property(nonatomic,assign)NSInteger   tagEx;
@property(nonatomic,assign)NSInteger   lableStyle;
@property(nonatomic,assign)int         fieldType;
@property(nonatomic,retain)NSString    *fieldName;
@property(nonatomic) UIKeyboardType keyboardType;
@property(nonatomic) BOOL secureTextEntry;
@property(nonatomic) BOOL enabled;
@property(nonatomic,readonly)id    control;

- (id)initWithFrame:(CGRect)frame withStyle:(MCControlStyle)style;
@end
